home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / HyperCard / HyperCard 1.2.2 International / HyperCard Danish (DK-1.2.2) / Idestakke / Baggrundsideer / background_55040.txt < prev    next >
Text File  |  1988-12-19  |  10KB  |  446 lines

  1. -- background: 55040 from stack: in
  2. -- bmap block id: 51938
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on newStack
  8.   extend
  9. end newStack
  10.  
  11. on extend
  12.   -- type "udvid" into the message box and press return to make
  13.   -- a year's worth of new cards.
  14.   if the name of this stack contains "Baggrundsideer"
  15.   then
  16.   answer "Opret venligst en ny stak, f√∏r den udvides." with "OK"
  17. else
  18.   answer "Skal der laves kort til et nyt √•r?" with "OK" or "Annuller"
  19.   if it is "Annuller" then exit extend
  20.   put 60*60*24 into OneDay        --seconds in a day
  21.   go to last card of this background
  22.   put getStartDate() into start      --what date to begin on
  23.   if start is "Annuller" then exit extend
  24.   repeat with cnt = 1 to 53   --weeks in a year
  25.     put start into it        --a copy
  26.     convert it to long date
  27.     delete item 1 of it   -- get rid of "Mandag,"
  28.     put it into field "Uge"
  29.  
  30.     Repeat with index = 1 to 7
  31.       put word index of ("Mandag Tirsdag Onsdag Torsdag" && "Fredag L√∏rdag S√∏ndag") into myDay
  32.       put start into it
  33.       --convert each day so that date rolls over to "1"
  34.       --at end of month
  35.       convert it to long date
  36.       put (word 2 of item 2 of it) into field myDay
  37.       add OneDay to start
  38.     end repeat
  39.     doMenu New Card
  40.   end repeat
  41.   doMenu "slet kort"     --get rid of extra card at end
  42. end if
  43. end extend
  44.  
  45. function getStartDate
  46. -- end of stack or today, whichever is newer
  47. get field "Uge"
  48. if it is empty then put the date into it
  49. put startOfWeek(it) into it    --so we can compare
  50. put the date into thisWeek
  51. put startOfWeek(thisWeek) into thisWeek    --both at week starts in seconds
  52. if thisWeek < 2587766400 then
  53.   answer "Indstil Kontrolpanelet til dags dato" with "OK"
  54.   return "Annuller"
  55. end if
  56. if it >= thisWeek then return it   --calendar already beyond today
  57. convert it to short date
  58. convert thisWeek to short date
  59. answer "Startende fra hvilken dato?" with it or thisWeek or "Annuller"
  60. if it is "Annuller" then return it
  61. convert it to seconds
  62. return it
  63. end getStartDate
  64.  
  65. function startOfWeek aDate     -- the seconds for the start of this week
  66. put 60*60*24 into OneDay      --seconds in a day
  67. put aDate into it
  68. convert it to long date
  69. repeat while item 1 of it <> "Mandag"
  70.   convert it to seconds
  71.   subtract OneDay from it
  72.   convert it to long date
  73. end repeat
  74. convert it to seconds
  75. return it
  76. end startOfWeek
  77.  
  78.  
  79. on openBackground
  80.   push recent card
  81. end openBackground
  82.  
  83.  
  84. -- part 11 (field)
  85. -- low flags: 00
  86. -- high flags: 0000
  87. -- rect: left=68 top=27 right=47 bottom=381
  88. -- title width / last selected line: 0
  89. -- icon id / first selected line: 0 / 0
  90. -- text alignment: 0
  91. -- font id: 2
  92. -- text size: 14
  93. -- style flags: 256
  94. -- line height: 18
  95. -- part name: Uge
  96.  
  97.  
  98. -- part 29 (field)
  99. -- low flags: 00
  100. -- high flags: 0000
  101. -- rect: left=5 top=47 right=69 bottom=36
  102. -- title width / last selected line: 0
  103. -- icon id / first selected line: 0 / 0
  104. -- text alignment: 0
  105. -- font id: 2
  106. -- text size: 18
  107. -- style flags: 0
  108. -- line height: 24
  109. -- part name: Mandag
  110.  
  111.  
  112. -- part 30 (field)
  113. -- low flags: 00
  114. -- high flags: 0000
  115. -- rect: left=129 top=47 right=69 bottom=160
  116. -- title width / last selected line: 0
  117. -- icon id / first selected line: 0 / 0
  118. -- text alignment: 0
  119. -- font id: 2
  120. -- text size: 18
  121. -- style flags: 0
  122. -- line height: 24
  123. -- part name: Tirsdag
  124.  
  125.  
  126. -- part 31 (field)
  127. -- low flags: 00
  128. -- high flags: 0000
  129. -- rect: left=254 top=47 right=69 bottom=285
  130. -- title width / last selected line: 0
  131. -- icon id / first selected line: 0 / 0
  132. -- text alignment: 0
  133. -- font id: 2
  134. -- text size: 18
  135. -- style flags: 0
  136. -- line height: 24
  137. -- part name: Onsdag
  138.  
  139.  
  140. -- part 32 (field)
  141. -- low flags: 00
  142. -- high flags: 0000
  143. -- rect: left=380 top=47 right=69 bottom=411
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 0 / 0
  146. -- text alignment: 0
  147. -- font id: 2
  148. -- text size: 18
  149. -- style flags: 0
  150. -- line height: 24
  151. -- part name: Torsdag
  152.  
  153.  
  154. -- part 33 (field)
  155. -- low flags: 00
  156. -- high flags: 0000
  157. -- rect: left=5 top=190 right=212 bottom=36
  158. -- title width / last selected line: 0
  159. -- icon id / first selected line: 0 / 0
  160. -- text alignment: 0
  161. -- font id: 2
  162. -- text size: 18
  163. -- style flags: 0
  164. -- line height: 24
  165. -- part name: Fredag
  166.  
  167.  
  168. -- part 34 (field)
  169. -- low flags: 00
  170. -- high flags: 0000
  171. -- rect: left=129 top=190 right=212 bottom=160
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 0 / 0
  174. -- text alignment: 0
  175. -- font id: 2
  176. -- text size: 18
  177. -- style flags: 0
  178. -- line height: 24
  179. -- part name: Lørdag
  180.  
  181.  
  182. -- part 35 (field)
  183. -- low flags: 00
  184. -- high flags: 0000
  185. -- rect: left=254 top=190 right=212 bottom=285
  186. -- title width / last selected line: 0
  187. -- icon id / first selected line: 0 / 0
  188. -- text alignment: 0
  189. -- font id: 2
  190. -- text size: 18
  191. -- style flags: 0
  192. -- line height: 24
  193. -- part name: Søndag
  194.  
  195.  
  196. -- part 12 (field)
  197. -- low flags: 01
  198. -- high flags: 0000
  199. -- rect: left=5 top=79 right=185 bottom=130
  200. -- title width / last selected line: 0
  201. -- icon id / first selected line: 0 / 0
  202. -- text alignment: 0
  203. -- font id: 2
  204. -- text size: 10
  205. -- style flags: 0
  206. -- line height: 13
  207. -- part name: 
  208.  
  209.  
  210. -- part 22 (field)
  211. -- low flags: 01
  212. -- high flags: 0000
  213. -- rect: left=129 top=79 right=185 bottom=252
  214. -- title width / last selected line: 0
  215. -- icon id / first selected line: 0 / 0
  216. -- text alignment: 0
  217. -- font id: 2
  218. -- text size: 10
  219. -- style flags: 0
  220. -- line height: 13
  221. -- part name: 
  222.  
  223.  
  224. -- part 23 (field)
  225. -- low flags: 01
  226. -- high flags: 0000
  227. -- rect: left=254 top=79 right=185 bottom=378
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 0
  231. -- font id: 2
  232. -- text size: 10
  233. -- style flags: 0
  234. -- line height: 13
  235. -- part name: 
  236.  
  237.  
  238. -- part 24 (field)
  239. -- low flags: 01
  240. -- high flags: 0000
  241. -- rect: left=380 top=79 right=185 bottom=506
  242. -- title width / last selected line: 0
  243. -- icon id / first selected line: 0 / 0
  244. -- text alignment: 0
  245. -- font id: 2
  246. -- text size: 10
  247. -- style flags: 0
  248. -- line height: 13
  249. -- part name: 
  250.  
  251.  
  252. -- part 25 (field)
  253. -- low flags: 01
  254. -- high flags: 0000
  255. -- rect: left=5 top=222 right=328 bottom=127
  256. -- title width / last selected line: 0
  257. -- icon id / first selected line: 0 / 0
  258. -- text alignment: 0
  259. -- font id: 2
  260. -- text size: 10
  261. -- style flags: 0
  262. -- line height: 13
  263. -- part name: 
  264.  
  265.  
  266. -- part 26 (field)
  267. -- low flags: 01
  268. -- high flags: 0000
  269. -- rect: left=129 top=222 right=328 bottom=252
  270. -- title width / last selected line: 0
  271. -- icon id / first selected line: 0 / 0
  272. -- text alignment: 0
  273. -- font id: 2
  274. -- text size: 10
  275. -- style flags: 0
  276. -- line height: 13
  277. -- part name: 
  278.  
  279.  
  280. -- part 27 (field)
  281. -- low flags: 01
  282. -- high flags: 0000
  283. -- rect: left=254 top=222 right=328 bottom=378
  284. -- title width / last selected line: 0
  285. -- icon id / first selected line: 0 / 0
  286. -- text alignment: 0
  287. -- font id: 2
  288. -- text size: 10
  289. -- style flags: 0
  290. -- line height: 13
  291. -- part name: 
  292.  
  293.  
  294. -- part 28 (field)
  295. -- low flags: 01
  296. -- high flags: 0000
  297. -- rect: left=380 top=222 right=302 bottom=506
  298. -- title width / last selected line: 0
  299. -- icon id / first selected line: 0 / 0
  300. -- text alignment: 0
  301. -- font id: 2
  302. -- text size: 10
  303. -- style flags: 0
  304. -- line height: 13
  305. -- part name: 
  306.  
  307.  
  308. -- part 37 (button)
  309. -- low flags: 00
  310. -- high flags: 0000
  311. -- rect: left=380 top=25 right=51 bottom=417
  312. -- title width / last selected line: 0
  313. -- icon id / first selected line: 4432 / 4432
  314. -- text alignment: 1
  315. -- font id: 0
  316. -- text size: 12
  317. -- style flags: 0
  318. -- line height: 16
  319. -- part name: gå til Opgaver
  320. ----- HyperTalk script -----
  321. on mouseUp
  322.   go to card "Opgaver1" of "Kalender"
  323. end mouseUp
  324.  
  325.  
  326.  
  327. -- part 38 (button)
  328. -- low flags: 00
  329. -- high flags: 0000
  330. -- rect: left=418 top=22 right=48 bottom=455
  331. -- title width / last selected line: 0
  332. -- icon id / first selected line: 3430 / 3430
  333. -- text alignment: 1
  334. -- font id: 0
  335. -- text size: 12
  336. -- style flags: 0
  337. -- line height: 16
  338. -- part name: Adresse
  339. ----- HyperTalk script -----
  340. on mouseUp
  341.   get the selection
  342.   visual effect zoom open
  343.   go to "Adresse"
  344.   if it is not empty then find it
  345. end mouseUp
  346.  
  347.  
  348.  
  349. -- part 39 (button)
  350. -- low flags: 00
  351. -- high flags: 0000
  352. -- rect: left=381 top=309 right=334 bottom=408
  353. -- title width / last selected line: 0
  354. -- icon id / first selected line: 15420 / 15420
  355. -- text alignment: 1
  356. -- font id: 0
  357. -- text size: 12
  358. -- style flags: 0
  359. -- line height: 16
  360. -- part name: Prev
  361. ----- HyperTalk script -----
  362. on mouseUp
  363.   visual effect wipe right
  364.   go to previous card
  365. end mouseUp
  366.  
  367.  
  368.  
  369. -- part 40 (button)
  370. -- low flags: 00
  371. -- high flags: 0000
  372. -- rect: left=407 top=310 right=333 bottom=434
  373. -- title width / last selected line: 0
  374. -- icon id / first selected line: 16560 / 16560
  375. -- text alignment: 1
  376. -- font id: 0
  377. -- text size: 12
  378. -- style flags: 0
  379. -- line height: 16
  380. -- part name: Next
  381. ----- HyperTalk script -----
  382. on mouseUp
  383.   visual effect wipe left
  384.   go to next card
  385. end mouseUp
  386.  
  387.  
  388.  
  389. -- part 41 (button)
  390. -- low flags: 00
  391. -- high flags: 0000
  392. -- rect: left=475 top=310 right=335 bottom=506
  393. -- title width / last selected line: 0
  394. -- icon id / first selected line: 6720 / 6720
  395. -- text alignment: 1
  396. -- font id: 0
  397. -- text size: 12
  398. -- style flags: 0
  399. -- line height: 16
  400. -- part name: Return
  401. ----- HyperTalk script -----
  402. on mouseUp
  403.   visual effect iris close
  404.   pop card
  405. end mouseUp
  406.  
  407.  
  408.  
  409. -- part 42 (button)
  410. -- low flags: 00
  411. -- high flags: 8004
  412. -- rect: left=456 top=28 right=45 bottom=502
  413. -- title width / last selected line: 0
  414. -- icon id / first selected line: 0 / 0
  415. -- text alignment: 1
  416. -- font id: 3
  417. -- text size: 9
  418. -- style flags: 0
  419. -- line height: 12
  420. -- part name: Udvid
  421. ----- HyperTalk script -----
  422. on mouseUp
  423.   extend
  424. end mouseUp
  425.  
  426.  
  427.  
  428. -- part 43 (button)
  429. -- low flags: 00
  430. -- high flags: 0000
  431. -- rect: left=348 top=23 right=52 bottom=380
  432. -- title width / last selected line: 0
  433. -- icon id / first selected line: 21700 / 21700
  434. -- text alignment: 1
  435. -- font id: 0
  436. -- text size: 12
  437. -- style flags: 0
  438. -- line height: 16
  439. -- part name: Hjem
  440. ----- HyperTalk script -----
  441. on mouseUp
  442.   visual effect iris open
  443.   go Home
  444. end mouseUp
  445.  
  446.